package com.site.wisdom_construction.controller.personnelModule;

import com.site.wisdom_construction.responseEntity.HadoopData;
import com.site.wisdom_construction.responseEntity.OneDataResult;
import com.site.wisdom_construction.service.personnelModule.BadnessWorkersService;
import com.site.wisdom_construction.service.personnelModule.BlacklistWorkersService;
import com.site.wisdom_construction.service.personnelModule.HonorWorkersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Author daiyifei
 * @Date 2022/5/27
 * @Description
 */
@Api(tags = "资信大数据接口")
@RestController
@RequestMapping("Hadoop")
@CrossOrigin
public class HadoopController {
    @Autowired
    private BadnessWorkersService badnessWorkersService;

    @Autowired
    private BlacklistWorkersService blacklistWorkersService;

    @Autowired
    private HonorWorkersService honorWorkersService;

    @ApiOperation(value = "资信大数据查询", notes = "测试数据:")
    @PostMapping("/findHadoop")
    public HadoopData findHadoop(@RequestBody Map map){
        HadoopData hadoopData = new HadoopData();
        hadoopData.setBadnessWorkersList(badnessWorkersService.findBadnessWorkersByWorkerCard(map));
        hadoopData.setBlacklistWorkersList(blacklistWorkersService.findBlacklistWorkersByWorkerCard(map));
        hadoopData.setHonorWorkersList(honorWorkersService.findHonorWorkersByWorkerCard(map));
        return hadoopData;
    }
}
